package com.deco.dao.warpper.product;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.deco.dao.delegate.product.IDicVehicleDao;
import com.deco.dao.domain.table.DicVehicle;
import com.deco.dao.logic.product.DicVehicleDao;
import com.deco.domain.vo.product.DicVehicleVo;
import com.free.ext.mybatis.warpper.BaseDaoWarpper;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 功能概述:
 * </p>
 * <p>
 * 功能详述:
 * </p>
 */
@Repository
public class DicVehicleDaoWarpper extends BaseDaoWarpper<DicVehicleVo,Integer,DicVehicle> implements IDicVehicleDao {

    /*========================================================================*
     *                         Public Fields (公共属性)
     *========================================================================*/

    /*========================================================================*
     *                         Private Fields (私有属性)
     *========================================================================*/
    @Autowired
    private DicVehicleDao dicVehicleDao;

    /*========================================================================*
     *                         Construct Methods (构造方法)
     *========================================================================*/

    /*========================================================================*
     *                         Public Methods (公有方法)
     *========================================================================*/

    @Override
    public List<Map<String,Object>> carList(Map<String,Object> params){
        return dicVehicleDao.carList(params);
    }

    @Override
    public List<Map<String,Object>> carList1(DicVehicleVo params){
        DicVehicle tb = convertToTable(params);
        return dicVehicleDao.carList1(tb);
    }

    @Override
    public List<Map<String,Object>> carList2(DicVehicleVo params){
        DicVehicle tb = convertToTable(params);
        return dicVehicleDao.carList2(tb);
    }

    @Override
    public List<DicVehicleVo> phonePartList(DicVehicleVo params){
        List<DicVehicleVo> vos = new ArrayList<>();
        DicVehicle tb = convertToTable(params);
        List<DicVehicle> tbs = dicVehicleDao.phonePartList(tb);
        if(tbs != null && tbs.size()>0){
            tbs.forEach(x->{
                vos.add(convertToView(x));
            });
        }
        return vos;
    }

    @Override
    public List<Map<String,Object>> selectTyreList(Map<String,Object> params){
        return dicVehicleDao.selectTyreList(params);
    }

    @Override
    public List<Map<String,Object>> selectTyreList2(Map<String,Object> params){
        return dicVehicleDao.selectTyreList2(params);
    }

    @Override
    public List<Map<String,Object>> selectTyreList4(Map<String,Object> params){
        return dicVehicleDao.selectTyreList4(params);
    }

    @Override
    public List<Map<String,Object>> selectTyreList5(Map<String,Object> params){
        return dicVehicleDao.selectTyreList5(params);
    }

    @Override
    public List<Map<String,Object>> selectTyreList6(Map<String,Object> params){
        return dicVehicleDao.selectTyreList6(params);
    }

    @Override
    public List<Map<String,Object>> selectTyreList1(Map<String,Object> params){
        return dicVehicleDao.selectTyreList1(params);
    }

    @Override
    public List<DicVehicleVo> selectTyreList3(DicVehicleVo params){
        List<DicVehicleVo> vos = new ArrayList<>();
        DicVehicle tb = convertToTable(params);
        List<DicVehicle> tbs =  dicVehicleDao.selectTyreList3(tb);
        if(tbs != null && tbs.size()>0){
            tbs.forEach(x->{
                vos.add(convertToView(x));
            });
        }
        return vos;
    }

    @Override
    public List<Map<String,Object>> getCd(Map<String,Object> params){
        return dicVehicleDao.getCd(params);
    }

    @Override
    public List<Map<String,Object>> getMdCd(Map<String,Object> params){
        return dicVehicleDao.getMdCd(params);
    }

    @Override
    public List<DicVehicleVo> selectAbleProd(DicVehicleVo params){
        List<DicVehicleVo> vos = new ArrayList<>();
        DicVehicle tb = convertToTable(params);
        List<DicVehicle> tbs = dicVehicleDao.selectAbleProd(tb);
        if(tbs != null && tbs.size()>0){
            tbs.forEach(x->{
                vos.add(convertToView(x));
            });
        }
        return vos;
    }

    @Override
    public List<DicVehicleVo> selectAbleProdSGMD(DicVehicleVo params){
        List<DicVehicleVo> vos = new ArrayList<>();
        DicVehicle tb = convertToTable(params);
        List<DicVehicle> tbs = dicVehicleDao.selectAbleProdSGMD(tb);
        if(tbs != null && tbs.size()>0){
            tbs.forEach(x->{
                vos.add(convertToView(x));
            });
        }
        return vos;
    }

    @Override
    public List<Map<String,Object>> selectMdAbleProd(Map<String,Object> params){
        return dicVehicleDao.selectMdAbleProd(params);
    }

    @Override
    public List<Map<String,Object>> selectMdAbleProdSGMD(Map<String,Object> params){
        return dicVehicleDao.selectMdAbleProdSGMD(params);
    }

    @Override
    public List<DicVehicleVo> resList(DicVehicleVo params){
        List<DicVehicleVo> vos = new ArrayList<>();
        DicVehicle tb = convertToTable(params);
        List<DicVehicle> tbs = dicVehicleDao.resList(tb);
        if(tbs != null && tbs.size()>0){
            tbs.forEach(x->{
                vos.add(convertToView(x));
            });
        }
        return vos;
    }

    @Override
    public List<Map<String,Object>> resList1(Map<String,Object> params){
        return dicVehicleDao.resList1(params);
    }

    @Override
    public List<DicVehicleVo> partList(DicVehicleVo params){
        List<DicVehicleVo> vos = new ArrayList<>();
        DicVehicle tb = convertToTable(params);
        List<DicVehicle> tbs = dicVehicleDao.partList(tb);
        if(tbs != null && tbs.size()>0){
            tbs.forEach(x->{
                vos.add(convertToView(x));
            });
        }
        return vos;
    }

    @Override
    public List<Map<String,Object>> desList(Map<String,Object> params){
        return dicVehicleDao.desList(params);
    }

    @Override
    public List<DicVehicleVo> desList1(DicVehicleVo params){
        List<DicVehicleVo> vos = new ArrayList<>();
        DicVehicle tb = convertToTable(params);
        List<DicVehicle> tbs = dicVehicleDao.desList1(tb);
        if(tbs != null && tbs.size()>0){
            tbs.forEach(x->{
                vos.add(convertToView(x));
            });
        }
        return vos;

    }

    @Override
    public List<DicVehicleVo> desList2(DicVehicleVo params){
        List<DicVehicleVo> vos = new ArrayList<>();
        DicVehicle tb = convertToTable(params);
        List<DicVehicle> tbs = dicVehicleDao.desList2(tb);
        if(tbs != null && tbs.size()>0){
            tbs.forEach(x->{
                vos.add(convertToView(x));
            });
        }
        return vos;
    }

    @Override
    public List<DicVehicleVo> selectVehicleNoByPart(DicVehicleVo params){
        List<DicVehicleVo> vos = new ArrayList<>();
        DicVehicle tb = convertToTable(params);
        List<DicVehicle> tbs = dicVehicleDao.selectVehicleNoByPart(tb);
        if(tbs != null && tbs.size()>0){
            tbs.forEach(x->{
                vos.add(convertToView(x));
            });
        }
        return vos;
    }

    @Override
    public List<Map<String,Object>> selectVehicleNoByPart1(Map<String,Object> params){
        return dicVehicleDao.selectVehicleNoByPart1(params);
    }

    @Override
    public List<Map<String,Object>> selectPartList1(Map<String,Object> params){
        return dicVehicleDao.selectPartList1(params);
    }

    @Override
    public List<DicVehicleVo> selectPartList(DicVehicleVo params){
        List<DicVehicleVo> vos = new ArrayList<>();
        DicVehicle tb = convertToTable(params);
        List<DicVehicle> tbs = dicVehicleDao.selectPartList(tb);
        if(tbs != null && tbs.size()>0){
            tbs.forEach(x->{
                vos.add(convertToView(x));
            });
        }
        return vos;
    }

    @Override
    public List<DicVehicleVo> selectBrandList(Map<String,Object> params){
        List<DicVehicleVo> vos = new ArrayList<>();
        List<DicVehicle> tbs = dicVehicleDao.selectBrandList(params);
        if(tbs != null && tbs.size()>0){
            tbs.forEach(x->{
                vos.add(convertToView(x));
            });
        }
        return vos;
    }

    @Override
    public List<DicVehicleVo> selectBrandList1(Map<String,Object> params){
        List<DicVehicleVo> vos = new ArrayList<>();
        List<DicVehicle> tbs = dicVehicleDao.selectBrandList1(params);
        if(tbs != null && tbs.size()>0){
            tbs.forEach(x->{
                vos.add(convertToView(x));
            });
        }
        return vos;
    }

    @Override
    public List<DicVehicleVo> selectModelList(Map<String,Object> params){
        List<DicVehicleVo> vos = new ArrayList<>();
        List<DicVehicle> tbs = dicVehicleDao.selectModelList(params);
        if(tbs != null && tbs.size()>0){
            tbs.forEach(x->{
                vos.add(convertToView(x));
            });
        }
        return vos;
    }

    @Override
    public List<DicVehicleVo> selectModelList1(Map<String,Object> params){
        List<DicVehicleVo> vos = new ArrayList<>();
        List<DicVehicle> tbs = dicVehicleDao.selectModelList1(params);
        if(tbs != null && tbs.size()>0){
            tbs.forEach(x->{
                vos.add(convertToView(x));
            });
        }
        return vos;
    }

    @Override
    public List<DicVehicleVo> selectDetType(Map<String,Object> params){
        List<DicVehicleVo> vos = new ArrayList<>();
        List<DicVehicle> tbs = dicVehicleDao.selectDetType(params);
        if(tbs != null && tbs.size()>0){
            tbs.forEach(x->{
                vos.add(convertToView(x));
            });
        }
        return vos;
    }

    @Override
    public List<DicVehicleVo> selectDetType1(Map<String,Object> params){
        List<DicVehicleVo> vos = new ArrayList<>();
        List<DicVehicle> tbs = dicVehicleDao.selectDetType1(params);
        if(tbs != null && tbs.size()>0){
            tbs.forEach(x->{
                vos.add(convertToView(x));
            });
        }
        return vos;
    }

    @Override
    public List<DicVehicleVo> selectModelYearList(Map<String,Object> params){
        List<DicVehicleVo> vos = new ArrayList<>();
        List<DicVehicle> tbs = dicVehicleDao.selectModelYearList(params);
        if(tbs != null && tbs.size()>0){
            tbs.forEach(x->{
                vos.add(convertToView(x));
            });
        }
        return vos;
    }

    @Override
    public List<DicVehicleVo> selectDisplacementl(Map<String,Object> params){
        List<DicVehicleVo> vos = new ArrayList<>();
        List<DicVehicle> tbs = dicVehicleDao.selectDisplacementl(params);
        if(tbs != null && tbs.size()>0){
            tbs.forEach(x->{
                vos.add(convertToView(x));
            });
        }
        return vos;
    }

    @Override
    public List<DicVehicleVo> selectDisplacementl1(Map<String,Object> params){
        List<DicVehicleVo> vos = new ArrayList<>();
        List<DicVehicle> tbs = dicVehicleDao.selectDisplacementl1(params);
        if(tbs != null && tbs.size()>0){
            tbs.forEach(x->{
                vos.add(convertToView(x));
            });
        }
        return vos;
    }

    @Override
    public List<DicVehicleVo> selectEngineList(String param){
        List<DicVehicleVo> vos = new ArrayList<>();
        List<DicVehicle> tbs = dicVehicleDao.selectEngineList(param);
        if(tbs != null && tbs.size()>0){
            tbs.forEach(x->{
                vos.add(convertToView(x));
            });
        }
        return vos;
    }



    @Override
    public void registerEnums() {

    }

    /*========================================================================*
     *                         Private Methods (私有方法)
     *========================================================================*/
}
